package core.gui;

import java.awt.BorderLayout;
import java.io.File;
import java.util.Observable;
import java.util.Observer;
import java.util.Scanner;

import javax.swing.JFileChooser;
import javax.swing.JFrame;



public class OutputFrame extends JFrame implements Observer{


	private OutputPanel myOPpanel;
	
	 public OutputPanel getOPpanel() {
		return myOPpanel;
	}

	/**
     * Create the GUI and show it.  For thread safety,
     * this method should be invoked from the
     * event dispatch thread.
     */
    public OutputFrame(String title) {
        this.setTitle(title);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        //Add contents to the window.
        this.getContentPane().add(myOPpanel = new OutputPanel(), BorderLayout.SOUTH);
        //Display the window.
        this.pack();
        this.setVisible(true);
    }

	@Override
	public void update(Observable o, Object arg) {
		myOPpanel.print(arg);
	}

}